package com.example.test.services;

import com.example.test.dao.MovieRepository;
import com.example.test.entities.Movies;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MovieService {
    @Autowired
    MovieRepository movieRepository;

    public Movies save(Movies movies){
        return movieRepository.save(movies);
    }

    public List<Movies> getAll(){
        return movieRepository.findAll();
    }
}
